Form minimize

Otázka od: p.sestak@corag.sk

16. 6. 2004 9:09

Zdravim,
mam taku prvacku otazku:
potrebujem zavesit na minimalizaciu Formu nejaku obsluhu (konkretne
TJvcTrayIcon.Active := true).
Ale TForm nema ziadny event OnMinimize  .
Pretom som chcel odchytit nejaku WM, ale neviem aku.
Vie mi niekto poradit?

Pavol Sestak
ICQ: 20989081


Odpovedá: Milan Tomes

16. 6. 2004 9:37

WM_COMMAND a ve wParam si pohlidej hodnotu SC_MINIMIZE

S pozdravem

Milan Tomes



> [mailto:delphi-l-owner@clexpert.cz]On Behalf Of p.sestak@corag.sk
> Sent: Wednesday, June 16, 2004 10:00 AM
>
> potrebujem zavesit na minimalizaciu Formu nejaku obsluhu (konkretne
> Pavol Sestak


Odpovedá: Petr Brant

16. 6. 2004 9:30

Tohle jsem nasel v MSDN:

The WM_SIZE message is sent to a window after its size has changed.
A window receives this message through its WindowProc function.
Syntax
 WM_SIZE

     WPARAM wParam
     LPARAM lParam;
     
Parameters
 wParam
  Specifies the type of resizing requested. This parameter can
be one of the following values.
 SIZE_MAXHIDE
  Message is sent to all pop-up windows when some other window
is maximized.
 SIZE_MAXIMIZED
  The window has been maximized.
 SIZE_MAXSHOW
  Message is sent to all pop-up windows when some other window
has been restored to its former size.
 SIZE_MINIMIZED
  The window has been minimized.
 SIZE_RESTORED
  The window has been resized, but neither the SIZE_MINIMIZED
nor SIZE_MAXIMIZED value applies.
 lParam
  The low-order word of lParam specifies the new width of the
client area.
  The high-order word of lParam specifies the new height of
the client area.

RNDr. Petr Brant [brant@dcomm.cz]
http://web.redbox.cz/petr.brant


 potrebujem zavesit na minimalizaciu Formu nejaku obsluhu (konkretne
 TJvcTrayIcon.Active := true).
 Ale TForm nema ziadny event OnMinimize  .
 Pretom som chcel odchytit nejaku WM, ale neviem aku.
 Vie mi niekto poradit?

Odpovedá: js-delphi@quick.cz

16. 6. 2004 9:20

Odesilatel: p.sestak@corag.sk
> Ale TForm nema ziadny event OnMinimize  .
> Pretom som chcel odchytit nejaku WM, ale neviem aku.
> Vie mi niekto poradit?

Ahoj!
Pokud jsi instaloval delphi bez nejakych "kulisaren", tak se ti do do slozky
C:\Program files\Common files\

a tam nekam Delphi instalujou help k winapi, kde najdes zrovna tyhle informace!
Sorry, ze nejsem presnejsi, ale nemam to pred sebou, ale najdes to v pohode!
Ahoj
Jirka
--------------------------------------------------
Ing. Jiri Sokol; jiri.sokol@seznam.cz; 972 231 187
D6Prof+SP3; WinXPProf+SP1; FB 1.0.3
programator amater


Odpovedá: p.sestak@corag.sk

16. 6. 2004 9:43

>Tohle jsem nasel v MSDN:

>The WM_SIZE message is sent to a window after its size has changed.

Skusal som toto:

...
private
procedure WM_Minimize(var Message: TMessage); message WM_SIZE;
...

procedure TForm2.WM_Minimize(var Message: TMessage);
begin
 if(Message.WParam = SIZE_MINIMIZED) then
   TrayIcon.Active := true;
end;

ale nic mi tam nepride (mam tam break). Kde robim chybu?

Odpovedá: p.sestak@corag.sk

16. 6. 2004 9:44

Uz to mam,
TJvTrayIcon mi chyta tieto spravy a zrejme ich nepusti dalej na form  
Takze na form sa mi to potom nedostane - skusal som to iste s formularom.
ktory neobsahuje TJvTrayIcon a tam to chodilo.
Ale logicky by to malo ist najprv cez form a potom az ku koponentam, ktore
su polozene na form - je to pre man zahada.

>
> Skusal som toto:
>
> ...
> private
> procedure WM_Minimize(var Message: TMessage); message WM_SIZE;
> ...
>
> procedure TForm2.WM_Minimize(var Message: TMessage);
> begin
> if(Message.WParam = SIZE_MINIMIZED) then
> TrayIcon.Active := true;
> end;
>
> ale nic mi tam nepride (mam tam break). Kde robim chybu?
>


Odpovedá: Milos Velikovsky

16. 6. 2004 10:04

Pokud by se Vam jednalo o minimalizaci hlavniho formu aplikace (tzn. cele
aplikace) potom se staci povesit na udalost TApplication.onMinimize
(TNotifyEvent)

----- Original Message -----
From: <p.sestak@corag.sk>
To: <delphi-l@clexpert.cz>
Sent: Wednesday, June 16, 2004 9:59 AM
Subject: Form minimize


> Zdravim,
> mam taku prvacku otazku:
> potrebujem zavesit na minimalizaciu Formu nejaku obsluhu (konkretne
> TJvcTrayIcon.Active := true).
> Ale TForm nema ziadny event OnMinimize  .
> Pretom som chcel odchytit nejaku WM, ale neviem aku.
> Vie mi niekto poradit?
>
> Pavol Sestak
> ICQ: 20989081
>
>